import request from '@/utils/request'

// 查询资产租借记录列表
export function listInfo(query) {
  return request({
    url: '/system/leaseInfo/list',
    method: 'get',
    params: query
  })
}

// 查询资产租借记录详细
export function getInfo(id) {
  return request({
    url: '/system/leaseInfo/' + id,
    method: 'get'
  })
}

// 新增资产租借记录
export function addInfo(data) {
  return request({
    url: '/system/leaseInfo',
    method: 'post',
    data: data
  })
}

// 修改资产租借记录
export function updateInfo(data) {
  return request({
    url: '/system/leaseInfo',
    method: 'put',
    data: data
  })
}

// 删除资产租借记录
export function delInfo(id) {
  return request({
    url: '/system/leaseInfo/' + id,
    method: 'delete'
  })
}

// 归还资产租借记录
export function returnLeaseInfo(id) {
  return request({
    url: '/system/leaseInfo/returnLeaseInfo/' + id,
    method: 'get'
  })
}